// -*- mode: c++; coding: utf-8 -*-

#include <Ice/BuiltinSequences.ice>

module Robots {

  // Differents roles played by a robot.
  enum Role {Leader, Explorer};

  struct Vec2 {
    int x;
    int y;
  };

  struct SignPost {
    Vec2 pos;
  };

  sequence<SignPost> SignPostSeq;

  // ag    --> The agent that did the bid.
  // sp    --> The signpost in which the agent is interested in.
  // value --> The cost of the bid.
  // Highest values represent better bids.
  struct Bid {
    Agent* ag;
    SignPost sp;
    int value;
  };

  // To define communication messages between agents.
  // It allows scalability by inheritance.
  class Message {};

  // Used by the auctioneer to notify existing signposts.
  class Announcement extends Message {
    SignPostSeq signposts;
  };

  // Used by the auctioneer to notify that a round of
  // bids is closed.
  // sp --> The signpost assigned to an agent.
  class Close extends Message {
    SignPost sp;
  };

  // Used by the auctioneer to notify that
  // there are no more bids.
  class Finish extends Message {};

  // Enumerations to define speed and resolution.
  enum Speed {SLow, SMedium, SHigh};
  enum Resolution {RLow, RMedium, RHigh};  

  // Robot position in the field.
  struct RobotPos {
    // x, y values
    Vec2 pos;
    // camera orientation in relation to the x axis.
    float dir;
  };
};
